<template>
    <el-form ref="form" :model="form" label-width="80px">
        <el-form-item label="订单号">
            <span>{{ form._id }}</span>
        </el-form-item>
        <el-form-item label="用户">
            <span>{{ form.user_id.name }}</span>
        </el-form-item>
        <el-form-item label="手机">
            <span>{{ form.user_id.phone }}</span>
        </el-form-item>
        <el-form-item label="商品">
            <span>{{ form.goods_id.name }}</span>
        </el-form-item>
        <el-form-item label="单价">
            <span>{{ form.goods_id.price }}</span>
        </el-form-item>
        <el-form-item label="总价">
            <span>{{ form.sum }}</span>
        </el-form-item>

        <el-form-item label="状态">
            <el-radio-group v-model="form.status" size="mini">
                <el-radio-button label="未发货"></el-radio-button>
                <el-radio-button label="已发货"></el-radio-button>
                <el-radio-button label="已取消"></el-radio-button>
            </el-radio-group>
        </el-form-item>
        <el-form-item label="备注">
            <el-input v-model="form.remark"></el-input>
        </el-form-item>
    </el-form>
</template>

<script>
export default {
    props: ["editData"],
    data() {
        return {};
    },
    computed: {
        form() {
            return this.editData;
        }
    },
    methods: {
        onSubmit() {
            console.log("submit!");
        }
    }
};
</script>

<style>
.el-form-item {
    margin-bottom: 10px;
    font-size: 13px;
}
</style>
